<!DOCTYPE html>
<html>
<head>
	<title>NexHome</title>
    
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
	<meta http-equiv="Pragma" content="no-cache" />
	<meta http-equiv="Expires" content="0" />
	<meta http-equiv="Cache" content="no-cache">
	<link href="images/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
    <!-- bootstrap -->
    <link href="css/bootstrap/bootstrap.css" rel="stylesheet" />
    <link href="css/bootstrap/bootstrap-responsive.css" rel="stylesheet" />
    <link href="css/bootstrap/bootstrap-overrides.css" type="text/css" rel="stylesheet" />

    <!-- libraries -->
   <link href="css/lib/jquery-ui-1.10.2.custom.css" rel="stylesheet" type="text/css" />
    <link href="css/lib/font-awesome.css" type="text/css" rel="stylesheet" />

    <!-- global styles -->
    <link rel="stylesheet" type="text/css" href="css/layout.css" />
    <link rel="stylesheet" type="text/css" href="css/elements.css" />
    <link rel="stylesheet" type="text/css" href="css/icons.css" />

    <!-- this page specific styles -->
    <link rel="stylesheet" href="css/compiled/index.css" type="text/css" media="screen" />    

    <!-- open sans font -->
    <link href='css/OpenSans.css' rel='stylesheet' type='text/css' />

    <!-- lato font -->
    <link href='css/Lato.css' rel='stylesheet' type='text/css' />
	
<!--[if lt IE 9]>
      <script src="js/html5.js"></script>
    <![endif]-->     
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style>
	a{cursor:pointer}
	#back-to-top {
width: 45px;
height: 45px;
font-size: 16px;
line-height: 45px;
}
#back-to-top {
position: fixed;
right: 20px;
bottom: 20px;
z-index: 1001;
width: 30px;
height: 30px;
display: block;
background: #2f4354;
background-color: rgba(47, 67, 84, 0.85);
font-size: 13px;
text-align: center;
line-height: 30px;
border-top-right-radius: 3px;
border-top-left-radius: 3px;
border-bottom-right-radius: 3px;
border-bottom-left-radius: 3px;
cursor: pointer;
transition: background 0.25s linear;
}
#back-to-top i {
color: #fff;
}
.fa {
display: inline-block;
font-family: FontAwesome;
font-style: normal;
font-weight: normal;
line-height: 1;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.Hui-article-box {
position: absolute;
top: 55px;
right: 0;
bottom: 0;
left: 0;
overflow: hidden;
z-index: 1;
background-color: #fff;
}
.Hui-article {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: auto;
z-index: 1;}
.show_iframe iframe {
position: absolute;
bottom: 0;
height: 100%;
width: 100%;
}
	</style>
	<script src="js/jquery-1.10.2.min.js"></script>
    <script src="js/jquery-latest.js"></script>
    <script src="js/bootstrap.min.js"></script>
	<script src="js/bootstrap-table.js"></script>
    <script src="js/jquery-ui-1.10.2.custom.min.js"></script>  
    <script src="js/theme.js"></script>
	<script src="js/bootbox.min.js"></script>
<script>
/*scroll*/
if (document.documentElement.clientWidth >= 1300)
	$('#btntop').css('right', (document.documentElement.clientWidth - 1200) / 2 - 60);
else
	$('#btntop').css('right', 60);
$(window).scroll(function () {
	if ($(window).scrollTop() > 520) {
		$('#btntop').fadeIn();
	}
	else {
		$('#btntop').fadeOut();
	}
});
var timerForCircle;
var CurrorgID;
function requestID()
{ 
	var url = location.href;
	var paraString;
	if(url.indexOf("userid") != -1){ 
	paraString = url.substring(url.indexOf("=")+1,url.length);	 
	}
	else{
	paraString = "NO";
	}
	return paraString;  	
	
}
/******LJL20150286********/
function Reload_devModelMgr(username,idnum)
{				
	//var url = 'deviceMgr.html?username='+username;
	var url = 'devModelMgr.html?username='+username;
	CurrorgID = idnum;
	$("#dashboard-menu li").removeClass("active");
	$(".submenu").removeClass("active");
	$(".submenu li a").removeClass("active");
	$(".submenu").hide();
	$("#devMgr").addClass("active");
	$("#devMgr ul").show();
	$("#devMgr ul").addClass("active");
	//$("#devMgrLifirst").addClass("active");	//devmodelMgrLifirst
	$("#devmodelMgrLifirst").addClass("active");
	$("#mainIframe").attr("src",url);			            	         		 				
}
/*****************end***********/
function Reload_devOAM(username,idnum)
{				
	var url = 'deviceMgr.html?username='+username;
	CurrorgID = idnum;
	$("#dashboard-menu li").removeClass("active");
	$(".submenu").removeClass("active");
	$(".submenu li a").removeClass("active");
	$(".submenu").hide();
	$("#devMgr").addClass("active");
	$("#devMgr ul").show();
	$("#devMgr ul").addClass("active");
	$("#devMgrLifirst").addClass("active");	
	$("#mainIframe").attr("src",url);			            	         		 				
}
function Reload_CreatUser()
{
	$("#dashboard-menu li").removeClass("active");
	$(".submenu").removeClass("active");
	$(".submenu li a").removeClass("active");
	$(".submenu").hide();
	$("#userMgr").addClass("active");
	$("#userMgr ul").show();
	$("#userMgr ul").addClass("active");
	$("#userMgrLisec").addClass("active");	
	$("#mainIframe").attr("src","new-user.html");
}
function Reload_orgList()
{
	$("#dashboard-menu li").removeClass("active");
	$(".submenu").removeClass("active");
	$(".submenu li a").removeClass("active");
	$(".submenu").hide();
	$("#userMgr").addClass("active");
	$("#userMgr ul").show();
	$("#userMgr ul").addClass("active");
	$("#userMgrLifirst").addClass("active");	
	$("#mainIframe").attr("src","user-list.html");
}
	</script>
</head>
<body>

    <!-- navbar -->
    <div class="navbar navbar-inverse">
        <div class="navbar-inner">
            <button type="button" class="btn btn-navbar visible-phone" id="menu-toggler">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            
            <a class="brand" href="index.html"><img src="img/logo.png" /></a>

            <ul class="nav pull-right">                
               <!-- <li class="hidden-phone">
                    <input class="search" type="text" />
                </li>
                <li class="notification-dropdown hidden-phone">
                    <a href="#" class="trigger">
                        <i class="icon-warning-sign"></i> 
					</a>                   
                </li>
                <div class="copyrights">Collect from <a >NexHome</a></div>
                <li class="notification-dropdown hidden-phone">
                    <a href="#" class="trigger">
                        <i class="icon-envelope-alt"></i>
                    </a>                    
                </li>-->
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle hidden-phone" data-toggle="dropdown">
                        <span id="CurrentUser">Admin</span>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a id="personalinfo">我的信息</a></li>
                        <li><a id="resetpwd">密码重置</a></li>
                        
                    </ul>
                </li>
                <li class="settings hidden-phone">
                    <a id="personalinfottwo" role="button">
                        <i class="icon-cog"></i>
                    </a>
                </li>
                <li class="settings hidden-phone">
                    <a id="Userexit" role="button">
                        <i class="icon-share-alt"></i>
                    </a>
                </li>
            </ul>            
        </div>
    </div>
    <!-- end navbar -->

    <!-- sidebar -->
    <div id="sidebar-nav">
        <ul id="dashboard-menu">
            <!--<li >
                <div class="pointer">
                    <div class="arrow"></div>
                    <div class="arrow_border"></div>
                </div>
                <a onClick="RedTo('status.html')">
                    <i class="icon-home"></i>
                    <span>Home</span>
                </a>
            </li> -->           
           <li id='userMgr'>
                <a class="dropdown-toggle" href="#">
                    <i class="icon-group"></i>
                    <span>工程商管理</span>
                    <i class="icon-chevron-down"></i>
                </a>
                <ul class="submenu">
                    <li><a  id='userMgrLifirst' onClick="RedTo('user-list.html')" >工程商信息列表</a></li>
                    <li><a id='userMgrLisec' onClick="RedTo('new-user.html')">创建工程商账号</a></li>
                    <li><a id='devmodelMgrLifirst' onClick="RedTo('devModelMgr.html')">工程商模板管理</a></li>
                    
                </ul>
            </li>           
           
            <li id='devMgr'>
                <a class="dropdown-toggle ui-elements" href="#">
                    <i class="icon-code-fork"></i>
                    <span>设备管理</span>
                    <i class="icon-chevron-down"></i>
                </a>
                <ul class="submenu">
                    <li><a id='devMgrLifirst' onClick="RedTo('deviceMgr.html')">工程商设备管理</a></li>
                    
                    
                </ul>
            </li>

            <li id="MyInfo">
                <a class="dropdown-toggle" href="#">
                    <i class="icon-cog"></i>
                    <span>我的信息</span>
					<i class="icon-chevron-down"></i>
                </a>
				 <ul class="submenu">
                   <li><a id='MyInfoLifirst' onClick="RedTo('personal-info.html')">我的信息</a></li>
                   <li><a id='MyInfoLisec' onClick="RedTo('reset-password.html')">密码重置</a></li>
                </ul>
            </li>
            <li>
                <a  id='logout'>
                    <i class="icon-share-alt"></i>
                    <span>退出</span>
                    
                </a>
               
            </li>
        </ul>
    </div>
    <!-- end sidebar -->


	<!-- main container -->
    <section class="Hui-article-box">
	

    <div id="iframe_box" class="Hui-article">
		<div class="show_iframe">       
        	<iframe id="mainIframe" src="user-list.html" name="mainIframe" scrolling="yes" frameborder="0"></iframe>
		</div>
				
    </div>
	</section>
	<div class="modal small hide fade" id="UserexitModal" tabindex="-1" role="dialog" aria-labelledby="UserexitModalLabel" aria-hidden="true">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
					<h3 id="UserexitModalLabel">退出系统</h3>
				</div>
				<div class="modal-body">
					<p class="error-text"><i class="icon-warning-sign modal-icon"></i>是否确认退出系统？</p>
				</div>
				<div class="modal-footer">
					<button class="btn" data-dismiss="modal" aria-hidden="true">取消</button>
					<button class="btn btn-danger" data-dismiss="modal" id="UserexitModalbtn">确认</button>
				</div>
	</div>
	<div id="btntop" style="width:43px;height:44px;z-index:999;display:none; margin-bottom:50px" class="pull-right">
<a href="javascript:void(0)" onClick="javascript:scroll(0,0)">
<img src="img/top.png" title="回顶部" alt="回顶部" />
</a></div>
	<!-- scripts -->
	
<script type="text/javascript">
if (top.location != location)
{

		top.location.href = "index.html";
}//<!-- 防止页面嵌套，设置index.htm为顶级-->

　//　 top.location.href = "index.html";
//}
function GetCurrentUserInfo()
{
  	//获取当前用户的信息
	$.ajax({ 
		url : '../adminMgr/admin/loadMgrAdminInfo',  
		type: 'GET',  
		dataType: 'json',  
		timeout: 10000,  
		cache: false,
		
		error : function() {
				 alert("获取数据异常，请重新获取"); 
				},   
		success:function(data){
			if(data.resultCode != '10000'){	
				bootbox.alert(data.resultMsg, function() {					
					window.location.href = "sign-in.html";
				});		
								
			}
			else{
				$('#CurrentUser').html(data.data.account);
			}
			
		} 
	})  
}
function RedTo(path)
{	
	$("#mainIframe").attr("src",path);
}
function circleRefresh()
{
	$.ajax({ 
		url : '../common/openApi/keepAlive',  
		type: 'GET',  
		dataType: 'json',  
		timeout: 100000,  
		cache: false,
		
		error : function() {
				 clearInterval(timerForCircle);
				 bootbox.alert('与服务器连接断开请重新登录', function() {					
					window.location.href = "sign-in.html";
				});	 
				},   
		success:function(data){
			if(data.resultCode != '10000'){
				clearInterval(timerForCircle);	
				bootbox.alert(data.resultMsg, function() {					
					window.location.href = "sign-in.html";
				});		
								
			}
			
		} 
	})  
}		
$(function () {
if (!$.support.leadingWhitespace){
bootbox.alert("对不起，该管理系统暂不支持IE浏览器，请使用谷歌，火狐等非IE浏览器", function() {					
					window.location.href = "sign-in.html";
});	
}
$("#userMgr").addClass("active");
	$("#userMgr ul").show();
	$("#userMgr ul").addClass("active");
	$("#userMgrLifirst").addClass("active");
GetCurrentUserInfo();
timerForCircle = setInterval("circleRefresh();",60000); 

$('#personalinfo,#personalinfottwo').click(function(){
	$("#dashboard-menu li").removeClass("active");
	$(".submenu").removeClass("active");
	$(".submenu li a").removeClass("active");
	$(".submenu").hide();
	$("#MyInfo").addClass("active");
	$("#MyInfo ul").show();
	$("#MyInfo ul").addClass("active");
	$("#MyInfoLifirst").addClass("active");	
	$("#mainIframe").attr("src","personal-info.html");
	
});
$('#resetpwd').click(function(){
	$("#dashboard-menu li").removeClass("active");
	$(".submenu").removeClass("active");
	$(".submenu li a").removeClass("active");
	$(".submenu").hide();
	$("#MyInfo").addClass("active");
	$("#MyInfo ul").show();
	$("#MyInfo ul").addClass("active");
	$("#MyInfoLisec").addClass("active");	
	$("#mainIframe").attr("src","reset-password.html");
	
});
$("#Userexit,#logout").click(function(){
	$('#UserexitModal').modal('show');

});
$("#UserexitModalbtn").click(function(){
	$.ajax({                 						
					url : '../common/auth/mgrAdminLogout',  
					type: 'GET',  
					dataType: 'json',  
					timeout: 10000,  
					cache: false,
					//data:{sKey: username},                
					error : function() {
						alert("退出登录连接超时...");				
					},    
					success: function(data) {
						if(data.resultCode != '10000'){
							bootbox.alert(data.resultMsg, function() {					
								
							});														
						}
						else{
						window.location.href = "sign-in.html";		
						}
					}
					   
				})
});
$("#dashboard-menu li").click(function(){
/*if($(this).index()==0 ){
	$("#dashboard-menu li").removeClass("active");
	
	$(this).addClass("active");
	$(".submenu li a").removeClass("active");	
	$(".submenu").hide();
}*/
	
	
	
	return false;
});
$(".submenu li").click(function(){
	$("#dashboard-menu li").removeClass("active");
	$(".submenu").removeClass("active");
	$(".submenu li a").removeClass("active");
	$(".submenu").hide();
	$(this).parent('ul').show();
	$(this).parent().addClass("active");
	$(this).parent().parent('li').addClass("active");
	$(this).children().addClass("active");
	return false;
});
	

});
    </script>

</body>
</html>